package com.gzkemays.demo.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.oauth2.provider.token.store.InMemoryTokenStore;

/**
 * @author gzkemays
 * @date 2021/3/18 14:15
 */
@Configuration
public class AccessTokenConfig {
  @Bean
  public TokenStore tokenStore() {
    // 存储 token,既可以存储至 redis 也可以存储至 session,此处存储至 session
    return new InMemoryTokenStore();
  }
}
